<?php
/********************************************************************
**************************************************************************

WPBoxes WordPress Theme, Copyright 2012 ItsAbhik.com
WPBoxes is distributed under the terms of the GNU GPLv3 License

**************************************************************************
***********************************************************************/
?>
<?php get_header(); ?>

<div id="content">
	<?php if (wpboxes_options('wpboxes_tw') == 'show') { ?>
		<div id="top-widget">
			<?php if ( dynamic_sidebar('top-widget') ) : else : ?>
			<?php endif; ?>
			<div class="clear"></div>
		</div>
	<?php } ?>	

	<div id="homepage">
		<h1>Showing Results for "<span><?php echo get_search_query(); ?></span>"</h1>
	<div class="homebox">
	
	<?php $count = wpboxes_options('wpboxes_nlp');
		$args = array( 'posts_per_page'=>$count, 's' => $s, 'paged' => $paged );
		$wp_query = new WP_Query( $args );
			if ($wp_query->have_posts()) : while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>

		<div class="home-widgets">
			<img src="<?php echo wpboxes_tn_image(); ?>" class="" alt="" width="200" height="100" />
			<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
			<p><?php echo wpboxes_custom_excerpt(get_the_content(), wpboxes_options('wpboxes_lel'));?></p>
			<div class="cread"><a href="<?php the_permalink(); ?>">Continue &rarr;</a></div>
			<div class="home-widgets-social">
			</div>
		</div>
		<?php endwhile; ?>

		<div class="clear"></div>
	</div>
						
		<?php if (function_exists( 'wpboxes_pagination' )) { global $additional_loop; wpboxes_pagination($additional_loop['max_num_pages']);} else {?>
		<div class="navigation">
		<div class="next-posts"><?php next_posts_link('Older Posts &rarr;'); ?></div>
		<div class="prev-posts"><?php previous_posts_link('&larr; Newer Posts'); ?></div>
		</div>
		<?php } ?>
		<?php wp_reset_query(); ?>		

		
		<?php else : ?>

		<div class="home-widgets">
		<h2>Sorry, No Posts were found with this term</h2>
		</div>
		<div class="clear"></div>
		</div>
	<?php endif; ?>
	
	</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>